<template>
  <div class="listViewTop">
    <img :src="coverImgUrl" alt="" class="bg" />
    <!-- 内容区域 -->
    <div class="content">
      <div class="contentLeft">
        <img :src="coverImgUrl" alt="" />
        <span>
          <i class="iconfont icon-a4gl-play123"></i>
          {{ playCount }}
        </span>
      </div>
      <div class="contentRight">
        <h3>{{ name }}</h3>
        <div class="author">
          <img :src="avatarUrl" class="header" />
          <span class="authorname">{{ nickname }}</span>
        </div>
        <div class="description">
          {{ description }}
        </div>
      </div>
    </div>
    <!-- 四个图标区域 -->
    <div class="iconList">
      <div class="iconItem">
        <i class="iconfont icon-pinglun"></i>
        <span>{{ commentCount }}</span>
      </div>
      <div class="iconItem">
        <i class="iconfont icon-fenxiang"></i>
        <span>{{ shareCount }}</span>
      </div>
      <div class="iconItem">
        <i class="iconfont icon-iconfontzhizuobiaozhun023146"></i>
        <span>下载</span>
      </div>
      <div class="iconItem">
        <i class="iconfont icon-duoxuan"></i>
        <span>多选</span>
      </div>
    </div>
  </div>
</template>

<script>
// import playCount from "../../utils/playCount.js";
export default {
  functional: true,
  props: {
    //封面背景图
    coverImgUrl: {
      type: String,
      default: "",
    },
    //评论数
    playCount: {
      type: Number,
      default: "",
    },
    //作者头像
    avatarUrl: {
      type: String,
      default: "",
    },
    //详情
    name: {
      type: String,
      default: "",
    },
    //作者姓名
    nickname: {
      type: String,
      default: "",
    },
    //歌单详情介绍
    description: {
      type: String,
      default: "",
    },
    commentCount: {
      type: Number,
      default: 0,
    },
    shareCount: {
      type: Number,
      default: 0,
    },
  },
};
</script>

<style lang="less" scoped>
.listViewTop {
  width: 7.5rem;
  margin-top: 0.2rem;
  padding: 0 0.2rem;
  height: 6rem;
  .bg {
    position: fixed;
    left: 0;
    top: 0;
    width: 7.5rem;
    height: auto;
    z-index: -1;
    //模糊度
    filter: blur(40px);
  }
}
.back .title {
  color: #fff;
  font-size: 0.35rem;
}
.content {
  padding: 0.6rem 0;
  display: flex;
  justify-content: space-between;
  //左边图像
  .contentLeft {
    position: relative;
    width: 2.8rem;
    height: 2.8rem;
    img {
      width: 100%;
      height: 100%;
      border-radius: 0.1rem;
    }
    span {
      position: absolute;
      right: 0.05rem;
      top: 0.05rem;
      color: #ccc;
      font-size: 0.2rem;
      .iconfont {
        margin-left: 0;
        font-size: 0.2rem;
      }
    }
  }
  //右边文字区域
  .contentRight {
    width: 3.5rem;
    h3 {
      color: #fff;
    }
    .author {
      margin: 0.33rem 0;
      display: flex;
      align-items: center;
      img.header {
        width: 0.6rem;
        height: 0.6rem;
        border-radius: 0.3rem;
        margin-right: 0.1rem;
      }
      .authorname {
        color: #ccc;
        font-size: 0.21rem;
      }
    }
    .description {
      font-size: 0.24rem;
      color: #aaa;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
  }
}
//四个图标区域
.iconList {
  display: flex;
  justify-content: space-around;
  align-items: center;
  .iconItem {
    text-align: center;
    display: flex;
    flex-direction: column;
    color: #fff;
    span {
      font-size: 0.2rem;
      padding-top: 0.1rem;
    }
  }
  .iconfont {
    font-size: 0.5rem;
  }
}
</style>
